package com.codeZ.IteratorPattern;

/**
 * 具体集合类
 *
 * @author codeZhang
 * @Date 2024/8/29 15:29
 */
public class TopicList implements ListList<Topic> {

    private final Topic[] topics;

    public TopicList(Topic[] topics) {
        this.topics = topics;
    }

    @Override
    public IteratorIterator<Topic> Iterator() {
        return new TopicIterator(topics);
    }
}